package co.yixiang.modules.user.service;

import co.yixiang.common.service.BaseService;
import co.yixiang.domain.PageResult;
import co.yixiang.modules.user.domain.MonthlyManagementAward;
import co.yixiang.modules.user.domain.MonthlyManagementAwardDetail;
import co.yixiang.modules.user.service.dto.MonthlyManagementAwardDetailDto;
import co.yixiang.modules.user.service.dto.MonthlyManagementAwardDetailQueryCriteria;
import co.yixiang.modules.user.service.dto.MonthlyManagementAwardDto;
import co.yixiang.modules.user.service.dto.MonthlyManagementAwardQueryCriteria;
import co.yixiang.modules.user.vo.MonthlyAwardVo;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;

/**
* @author lsh
* @date 2021-05-12
*/
public interface MonthlyManagementAwardDetailService extends BaseService<MonthlyManagementAwardDetail>{

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
    */
    PageResult<MonthlyManagementAwardDetailDto>  queryAll(MonthlyManagementAwardDetailQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<MonthlyManagementAwardDto>
    */
    List<MonthlyManagementAwardDetail> queryAll(MonthlyManagementAwardDetailQueryCriteria criteria);

    /**
     * 导出数据
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
    */
    void download(List<MonthlyManagementAwardDetailDto> all, HttpServletResponse response) throws IOException;

    /**
     * 更新审核状态
     * @param resources MonthlyManagementAward
     */
    void doApprove(MonthlyManagementAwardDetail resources);

    /**
     * 联创查询列表
     * @param page page
     * @param limit limit
     * @param uid uid
     * @return list
     */
    MonthlyAwardVo getAwardMain4monthList(int page, int limit, long uid, String month);

    /**
     * 按月份、用户统计数据
     * @param month
     * @return JSONObject
     */
    List<HashMap<String,Object>> getMonthData(String month);
}
